package org.shilong.UI;

import org.shilong.UI.friend.FriendCenterFrame;
import org.shilong.UI.party.BrandPartyCenterFrame;
import org.shilong.UI.profile.MyProfileFrame;
import org.shilong.Utility.IntentUtility;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.widget.TextView;

public class TotalMainFrame extends Activity {


	private  TextView to_show_weibo, to_show_juhui,to_show_shezhi;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);

		setContentView( R.layout.layout_total_main_content );


		initViews();

		registetEvents();
	}

	private void registetEvents() {
		// TODO Auto-generated method stub


		to_show_weibo.setOnClickListener( new View.OnClickListener() {

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				
				IntentUtility.goNextFrame( TotalMainFrame.this, FriendCenterFrame.class, null );
			}
		});


		to_show_juhui.setOnClickListener( new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				IntentUtility.goNextFrame( TotalMainFrame.this, BrandPartyCenterFrame.class, null );
			}
		});

		to_show_shezhi.setOnClickListener( new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
				IntentUtility.goNextFrame( TotalMainFrame.this, MyProfileFrame.class, null );

			}
		});
	}

	private void initViews(){

		to_show_weibo = (TextView)this.findViewById(R.id.to_show_weibo);
		to_show_juhui = (TextView)this.findViewById(R.id.to_show_juhui);
		to_show_shezhi = (TextView)this.findViewById(R.id.to_show_shezhi);
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
		
		boolean  flag = false;
		
		switch ( keyCode ) {
		case KeyEvent.KEYCODE_BACK:
			
			System.exit(0);
			
			flag =  true;
			
			break;

		default:
			break;
		}
		
		return flag;
	}
	
	

}
